<?php
	header("Content-type: application/vnd.ms-word");
	//header("Content-type: application/vnd.ms-excel");
	header("Content-Disposition: attachment;Filename=Diemthi_.doc");
	//header("Content-Disposition: attachment;Filename=Diemthi_.xls");
		//header("Content-Disposition: attachment;Filename=Bangdiem_.xls");
	header("Pragma: no-cache");
?>
<div id="globalContainer">
	<div id="content" class="hasLeftCol">
		<div id="contentCol" class="hasRightCol">
			<div id="rightCol" >
				<div class="name-page-cms">	Kỳ thi: <?php echo $this->exam_obj['full_name'];?>
				</div>
			
				<div class="name-page-cms">	Điểm làm bài của sinh viên lớp: <?php echo $this->class_obj['full_name'];?>
				</div>
			</div>
			
			<!-- CMS -->
			<?php if (count($this->StudentInClass)>0)  { ?>
				<div class="table-score-OfTest-student">
				<table class="datatable">
					<tr>
						<th>STT</th>
						<th>Mã số SV</th>
						<th>Họ tên</th>
						<th>Điểm</th>
					</tr>
					<?php foreach ($this->StudentInClass as $key=>$StudentInClassItem){ ?>
					<tr>
						<td><?php echo ($key+1); ?></td>
						<td><?php echo $StudentInClassItem['user_obj']['user_code']; ?></td>
						<td><?php echo $StudentInClassItem['user_obj']['firstname']." ".$StudentInClassItem['user_obj']['lastname']; ?></td>
						<td><?php if($StudentInClassItem['hist_test_obj']['total_score']==null)
							 		 echo "Chưa thi";
							 	  else{ 
							 		echo $StudentInClassItem['hist_test_obj']['total_score']; ?></td>
						<?php } ?>
					</tr>
					<?php } ?>
				</table>
				</div>
			<?php } ?>
			<!-- CMS -->
			<!-- Dialog Add new  -->
			<!-- Dialog Add new  -->		
		</div>
	</div>
</div>
